<html>
<head><meta charset="utf-8"><title>Adding a lint to `HardwiredLints` causes it to be ignored · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Adding.20a.20lint.20to.20.60HardwiredLints.60.20causes.20it.20to.20be.20ignored.html">Adding a lint to `HardwiredLints` causes it to be ignored</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="214925053"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Adding%20a%20lint%20to%20%60HardwiredLints%60%20causes%20it%20to%20be%20ignored/near/214925053" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Adding.20a.20lint.20to.20.60HardwiredLints.60.20causes.20it.20to.20be.20ignored.html#214925053">(Oct 29 2020 at 04:20)</a>:</h4>
<p>I don't understand the failure in <a href="https://github.com/rust-lang/rust/pull/78114">https://github.com/rust-lang/rust/pull/78114</a>. Really I don't understand why that PR is necessary in the first place.</p>



<a name="215662140"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Adding%20a%20lint%20to%20%60HardwiredLints%60%20causes%20it%20to%20be%20ignored/near/215662140" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Adding.20a.20lint.20to.20.60HardwiredLints.60.20causes.20it.20to.20be.20ignored.html#215662140">(Nov 05 2020 at 01:28)</a>:</h4>
<p>bump - does anyone know why this is happening? I don't know who to ask or where to look</p>



<a name="215677994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Adding%20a%20lint%20to%20%60HardwiredLints%60%20causes%20it%20to%20be%20ignored/near/215677994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Adding.20a.20lint.20to.20.60HardwiredLints.60.20causes.20it.20to.20be.20ignored.html#215677994">(Nov 05 2020 at 07:27)</a>:</h4>
<p>afaik hardwired lints don't have their own lint pass but instead are emitted during other parts of compilation</p>



<a name="215678128"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Adding%20a%20lint%20to%20%60HardwiredLints%60%20causes%20it%20to%20be%20ignored/near/215678128" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Adding.20a.20lint.20to.20.60HardwiredLints.60.20causes.20it.20to.20be.20ignored.html#215678128">(Nov 05 2020 at 07:30)</a>:</h4>
<p>I think you instead want to use something like <code>declare_lint_pass!(UnusedBraces =&gt; [UNUSED_BRACES]);</code></p>



<a name="215678138"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Adding%20a%20lint%20to%20%60HardwiredLints%60%20causes%20it%20to%20be%20ignored/near/215678138" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Adding.20a.20lint.20to.20.60HardwiredLints.60.20causes.20it.20to.20be.20ignored.html#215678138">(Nov 05 2020 at 07:31)</a>:</h4>
<p>but tbh I also don't fully understand what's going on here <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="215739717"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Adding%20a%20lint%20to%20%60HardwiredLints%60%20causes%20it%20to%20be%20ignored/near/215739717" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Adding.20a.20lint.20to.20.60HardwiredLints.60.20causes.20it.20to.20be.20ignored.html#215739717">(Nov 05 2020 at 16:45)</a>:</h4>
<p><span class="user-mention silent" data-user-id="216206">lcnr</span> <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/Adding.20a.20lint.20to.20.60HardwiredLints.60.20causes.20it.20to.20be.20ignored/near/215678128">said</a>:</p>
<blockquote>
<p>I think you instead want to use something like <code>declare_lint_pass!(UnusedBraces =&gt; [UNUSED_BRACES]);</code></p>
</blockquote>
<p>well the pass is not part of the compiler</p>



<a name="215739750"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Adding%20a%20lint%20to%20%60HardwiredLints%60%20causes%20it%20to%20be%20ignored/near/215739750" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Adding.20a.20lint.20to.20.60HardwiredLints.60.20causes.20it.20to.20be.20ignored.html#215739750">(Nov 05 2020 at 16:45)</a>:</h4>
<p>it's in collect_intra_doc_links, which is in rustdoc</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>